{"ast":null,"code":"import { createTheme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { PresetColors } from './interface';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nimport genComponentStyleHook from './util/genComponentStyleHook';\nimport statisticToken, { merge as mergeToken, statistic } from './util/statistic';\nconst defaultTheme = createTheme(defaultDerivative);\nexport {\n// colors\nPresetColors,\n// Statistic\nstatistic, statisticToken, mergeToken,\n// hooks\nuseStyleRegister, genComponentStyleHook };\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport const defaultConfig = {\n  token: defaultSeedToken,\n  hashed: true\n};\nexport const DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);\n// ================================== Hook ==================================\nexport function useToken() {\n  const {\n    token: rootDesignToken,\n    hashed,\n    theme,\n    components\n  } = React.useContext(DesignTokenContext);\n  const salt = `${version}-${hashed || ''}`;\n  const mergedTheme = theme || defaultTheme;\n  const [token, hashId] = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n    salt,\n    override: Object.assign({\n      override: rootDesignToken\n    }, components),\n    formatToken\n  });\n  return [mergedTheme, token, hashed ? hashId : ''];\n}","map":{"version":3,"names":["createTheme","useCacheToken","useStyleRegister","React","version","PresetColors","defaultDerivative","defaultSeedToken","formatToken","genComponentStyleHook","statisticToken","merge","mergeToken","statistic","defaultTheme","defaultConfig","token","hashed","DesignTokenContext","createContext","useToken","rootDesignToken","theme","components","useContext","salt","mergedTheme","hashId","override","Object","assign"],"sources":["/data/messenger.client/node_modules/antd/es/theme/internal.js"],"sourcesContent":["import { createTheme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { PresetColors } from './interface';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nimport genComponentStyleHook from './util/genComponentStyleHook';\nimport statisticToken, { merge as mergeToken, statistic } from './util/statistic';\nconst defaultTheme = createTheme(defaultDerivative);\nexport {\n// colors\nPresetColors,\n// Statistic\nstatistic, statisticToken, mergeToken,\n// hooks\nuseStyleRegister, genComponentStyleHook };\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport const defaultConfig = {\n  token: defaultSeedToken,\n  hashed: true\n};\nexport const DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);\n// ================================== Hook ==================================\nexport function useToken() {\n  const {\n    token: rootDesignToken,\n    hashed,\n    theme,\n    components\n  } = React.useContext(DesignTokenContext);\n  const salt = `${version}-${hashed || ''}`;\n  const mergedTheme = theme || defaultTheme;\n  const [token, hashId] = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n    salt,\n    override: Object.assign({\n      override: rootDesignToken\n    }, components),\n    formatToken\n  });\n  return [mergedTheme, token, hashed ? hashId : ''];\n}"],"mappings":"AAAA,SAASA,WAAW,EAAEC,aAAa,EAAEC,gBAAgB,QAAQ,qBAAqB;AAClF,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,iBAAiB,MAAM,kBAAkB;AAChD,OAAOC,gBAAgB,MAAM,eAAe;AAC5C,OAAOC,WAAW,MAAM,cAAc;AACtC,OAAOC,qBAAqB,MAAM,8BAA8B;AAChE,OAAOC,cAAc,IAAIC,KAAK,IAAIC,UAAU,EAAEC,SAAS,QAAQ,kBAAkB;AACjF,MAAMC,YAAY,GAAGd,WAAW,CAACM,iBAAiB,CAAC;AACnD;AACA;AACAD,YAAY;AACZ;AACAQ,SAAS,EAAEH,cAAc,EAAEE,UAAU;AACrC;AACAV,gBAAgB,EAAEO,qBAAqB;AACvC;AACA;AACA,OAAO,MAAMM,aAAa,GAAG;EAC3BC,KAAK,EAAET,gBAAgB;EACvBU,MAAM,EAAE;AACV,CAAC;AACD,OAAO,MAAMC,kBAAkB,GAAG,a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